//
//  NSString+SandboxFile.m
//  WestWolves
//
//  Created by JL on 15/12/10.
//  Copyright © 2015年 ZJ. All rights reserved.
//

#import "NSString+SandboxFile.h"

@implementation NSString (SandboxFile)
+(NSString *)sandBoxFile
{
    //沙盒目录
    return NSHomeDirectory();
}
+ (NSString *)searchDocumentFile
{
    NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    //NSSearchPathForDirectoriesInDomains: 搜索目录函数
    //NSDocumentDirectory ：代表正在搜索Document目录
    //NSUserDomainMask ：代表紧搜索沙盒目录
    return [paths firstObject];
}
+ (NSString *)searchLibraryFile
{
    NSArray *paths=NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
    return [paths firstObject];
}
+(NSString *)searchCachesFile
{
    NSArray *paths=NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
    return [paths firstObject];
}

+(NSString *)searchTmpFile
{
    return NSTemporaryDirectory();
}





@end
